package com.baizhi.controller;


import com.baizhi.entity.PmsCategory;
import com.baizhi.service.IPmsCategoryService;
import com.baizhi.vo.CascaderNodeVo;
import com.baizhi.vo.LayuiTreeNode;
import com.baizhi.vo.ZTreeNode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 商品三级分类 前端控制器
 * </p>
 *
 * @author lby
 * @since 2020-09-24
 */
@RestController
@RequestMapping("category")
public class PmsCategoryController {
    @Autowired
    private IPmsCategoryService pmsCategoryService;

    @RequestMapping("getLayuiTreeNodes")
    public List<LayuiTreeNode> getLayuiTreeNodes(){
        List<LayuiTreeNode> layuiTreeNodes = pmsCategoryService.getLayuiTreeNodes();
        return layuiTreeNodes;
    }
    @RequestMapping("getZTreeNodes")
    public List<ZTreeNode> getZTreeNodes(){
        return pmsCategoryService.getZTreeNodes();
    }

    @RequestMapping("getCascaderNodeVos")
    public List<CascaderNodeVo> getCascaderNodeVos(){
        return pmsCategoryService.getCascaderNodeVos();
    }


}
